﻿<%@ Page Title="" Language="C#" MasterPageFile="~/UI/PmUI/PmMaster.Master" AutoEventWireup="true"
    CodeBehind="EvaluteEmployee.aspx.cs" Inherits="HRM.UI.PmUI.EvaluationUI.EvaluteEmployee" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="mainContentBody" runat="server">
    <link href="../../../Styles/Employee/EvaluateEmployeeCss.css" rel="stylesheet" type="text/css" />
    <link href="../../../Scripts/htmlDatePicker.css" rel="stylesheet" type="text/css" />
    <script src="../../../Scripts/htmlDatePicker.js" type="text/javascript"></script>
    <script type="text/javascript" language="javascript">

        function CheckEvaField() {
            if (document.getElementById("<%=txtDate.ClientID%>").value == "") {
                document.getElementById("<%=msgLbl.ClientID%>").textContent = "Please select Evaluation Date!";
                document.getElementById("<%=msgLbl.ClientID%>").style.color = "red";
                document.getElementById("<%=txtDate.ClientID%>").focus();
                return false;
            }
            if (document.getElementById("<%=selectSkill.ClientID%>").value == "") {
                document.getElementById("<%=msgLbl.ClientID%>").textContent = "Please select Technical skill!";
                document.getElementById("<%=msgLbl.ClientID%>").style.color = "red";
                document.getElementById("<%=selectSkill.ClientID%>").focus();
                return false;
            }
            if (document.getElementById("<%=selectCommunication.ClientID%>").Value == "") {
                document.getElementById("<%=msgLbl.ClientID%>").textContent = "Please select communication!";
                document.getElementById("<%=msgLbl.ClientID%>").style.color = "red";
                document.getElementById("<%=selectCommunication.ClientID%>").focus();
                return false;
            }
            if (document.getElementById("<%=selectPunctuality.ClientID%>").Value == "") {
                document.getElementById("<%=msgLbl.ClientID%>").textContent = "Please select punctuality!";
                document.getElementById("<%=msgLbl.ClientID%>").style.color = "red";
                document.getElementById("<%=selectPunctuality.ClientID%>").focus();
                return false;
            } if (document.getElementById("<%=txtRemarks.ClientID%>").Value == "") {
                document.getElementById("<%=msgLbl.ClientID%>").textContent = "Please Give a remarks!";
                document.getElementById("<%=msgLbl.ClientID%>").style.color = "red";
                document.getElementById("<%=txtRemarks.ClientID%>").focus();
                return false;
            }
            return true;
        }
    </script>
    <table width="100%">
        <tr>
            <td align="right" style="width: 50%">
                Select Project:
            </td>
            <td>
                <select runat="server" id="selectEmployeeInProject" class="dropdownCss">
                    <option>Select Project</option>
                </select>
                <input type="button" runat="server" id="searchEmployee" value="Search Employee" onserverclick="SearchEmployee"
                    class="btnCss" />
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <fieldset>
                    <legend>Employee Information</legend>
                    <asp:GridView runat="server" ID="searchEmpGrid" AutoGenerateColumns="False" Width="100%"
                        BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3" CssClass="GridViewHeaderStyle"
                        OnPageIndexChanging="searchEmpGrid_PageIndexChanging" AllowPaging="True" PageSize="5"
                        OnRowCommand="searchEmpGrid_RowCommand">
                        <Columns>
                            <asp:TemplateField HeaderText="Employee Code">
                                <ItemTemplate>
                                    <asp:Label ID="lblCode" runat="server" Text='<%# Bind("Code.CodeName") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Name">
                                <ItemTemplate>
                                    <asp:Label ID="lblEmp" runat="server" Text='<%# Bind("Employee.Name") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Designation">
                                <ItemTemplate>
                                    <asp:Label ID="lblEmpName" runat="server" Text='<%# Bind("Designation.Title") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Project">
                                <ItemTemplate>
                                    <asp:Image ID="logo" runat="server" BorderColor="black" BorderStyle="Solid" BorderWidth="1"
                                        Height="50" ImageUrl='<%#Bind("Photo.FileName") %>' Width="50" />
                                    <asp:Label ID="lblProjectName" runat="server" Text='<%# Bind("project.ProjectName") %>'></asp:Label>
                                </ItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="lblProjectName" runat="server" Text='<%# Bind("project.ProjectName") %>'></asp:Label>
                                </ItemTemplate>
                                <ControlStyle Font-Underline="False" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Joining Date">
                                <ItemTemplate>
                                    <asp:Label ID="lbljod" runat="server" Text='<%# Bind("Employee.JoiningDate") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Photo">
                                <ItemTemplate>
                                    <asp:Image ID="logo" ImageUrl='<%#Bind("Photo.FileName") %>' runat="server" Width="50"
                                        Height="50" BorderStyle="Solid" BorderWidth="1" BorderColor="black" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl='<%# Eval("Code.CodeName", "../../../UI/PmUI/EmpModule/DetailsEmployee.aspx?emp-code={0}") %>'
                                        Target="_blank" Text="Details"></asp:HyperLink>
                                </ItemTemplate>
                                <ControlStyle Font-Underline="False" />
                            </asp:TemplateField>
                            <asp:TemplateField ShowHeader="False">
                                <ItemTemplate>
                                    <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Select"
                                        Text="Select" CommandArgument='<%# Eval("Code.CodeName") %>' />
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <FooterStyle CssClass="GridViewFooterStyle" />
                        <HeaderStyle CssClass="GridViewHeaderStyle" />
                        <PagerStyle CssClass="GridViewFooterStyle" HorizontalAlign="Center" />
                        <RowStyle ForeColor="#000066" />
                        <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                        <SortedAscendingCellStyle BackColor="#F1F1F1" />
                        <SortedAscendingHeaderStyle BackColor="#007DBB" />
                        <SortedDescendingCellStyle BackColor="#CAC9C9" />
                        <SortedDescendingHeaderStyle BackColor="#00547E" />
                    </asp:GridView>
                    <asp:Label runat="server" ID="lblFondResult"></asp:Label>
                    <table width="100%" class="GridviewStyle" runat="server" id="selectTable">
                        <tr>
                            <td align="center" colspan="2">
                                <asp:Label runat="server" ID="msgLbl"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 50%" align="right">
                                Employee Code:
                            </td>
                            <td style="width: 50%" align="left">
                                <asp:Label runat="server" ID="lblEmpCode" Font-Bold="True" Font-Italic="True" Font-Size="15pt"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 50%" align="right">
                                Date:
                            </td>
                            <td style="width: 50%" align="left">
                                <input type="text" id="txtDate" runat="server" class="textboxinput" readonly onclick="GetDate(this);" /><span class="estaricStar">*</span>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 50%" align="right">
                                Technical Skill
                            </td>
                            <td style="width: 50%" align="left">
                                <select id="selectSkill" runat="server" class="dropdownCss">
                                    <option value="">--Select Level--</option>
                                    <option value="Low">Low</option>
                                    <option value="Avarage">Avarage</option>
                                    <option value="High">High</option>
                                </select><span class="estaricStar">*</span>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 50%" align="right">
                                Communication
                            </td>
                            <td style="width: 50%" align="left">
                                <select id="selectCommunication" runat="server" class="dropdownCss">
                                    <option value="">--Select Level--</option>
                                    <option value="Low">Low</option>
                                    <option value="Avarage">Avarage</option>
                                    <option value="High">High</option>
                                </select><span class="estaricStar">*</span>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 50%" align="right">
                                Punctuality
                            </td>
                            <td style="width: 50%" align="left">
                                <select id="selectPunctuality" runat="server" class="dropdownCss">
                                    <option value="">--Select Level--</option>
                                    <option value="Low">Low</option>
                                    <option value="Avarage">Avarage</option>
                                    <option value="High">High</option>
                                </select><span class="estaricStar">*</span>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 50%" align="right">
                                Comments
                            </td>
                            <td style="width: 50%" align="left">
                                <textarea id="txtRemarks" runat="server" cols="25" rows="3" class="inputTextarea"></textarea><span
                                    class="estaricStar">*</span>
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td style="width: 50%" align="left">
                                <input id="submit" type="submit" value="Evaluate Employee" runat="server" onserverclick="EvaluateEmployee"
                                    class="btnCss" onclick="return CheckEvaField()" />
                            </td>
                        </tr>
                    </table>
                </fieldset>
            </td>
        </tr>
    </table>
    <asp:GridView runat="server" ID="evaluationReportGvr" Width="100%" AutoGenerateColumns="False"
        BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px"
        CellPadding="3" CssClass="GridviewStyle">
        <Columns>
            <asp:BoundField DataField="EmpName" HeaderText="Employee Name" />
            <asp:BoundField DataField="Designation" HeaderText="Designation" />
            <asp:BoundField DataField="Project" HeaderText="Project Name" />
            <asp:BoundField DataField="Skill" HeaderText="Skill" />
            <asp:BoundField DataField="Communication" HeaderText="Communication" />
            <asp:BoundField DataField="Punctuality" HeaderText="Punctuality" />
            <asp:BoundField DataField="Comments" HeaderText="Comments" />
            <asp:BoundField DataField="Date" HeaderText="Date" />
        </Columns>
        <FooterStyle BackColor="White" ForeColor="#000066" />
        <HeaderStyle CssClass="GridViewHeaderStyle" />
        <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
        <RowStyle ForeColor="#000066" />
        <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
        <SortedAscendingCellStyle BackColor="#F1F1F1" />
        <SortedAscendingHeaderStyle BackColor="#007DBB" />
        <SortedDescendingCellStyle BackColor="#CAC9C9" />
        <SortedDescendingHeaderStyle BackColor="#00547E" />
    </asp:GridView>
</asp:Content>
